home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 19 code / SimpliFace_V2 / SimpliFace2 user notes < prev    next >
Encoding:
Text File  |  1993-08-30  |  4.2 KB  |  49 lines  |  [TEXT/ttxt]

  1. SimpliFace version 1.0a2
  2. 30 August 1993
  3.  
  4. Copyright © 1993, commstalk hq. All Rights Reserved.
  5. Commercial use restricted: contact 'commstalk.hq' on AppleLink for details.
  6.  
  7.  
  8. SimpliFace requires AppleScript version 1.0.
  9.  
  10. This is a simple scriptable & attachable AE Object Model compliant application. It offers basic window building facilities: you can use it to construct scripted windows that contain text fields (not editable text, yet) and buttons.
  11.  
  12. The object containment hierarchy for SimpliFace looks like this:
  13.  
  14.    application (settable properties: script, shared handlers)
  15.      |
  16.      |--> window (settable properties: script, name, bounds, etc)
  17.               |
  18.               |--> button (settable properties: script, name, kind, bounds)
  19.               |
  20.               |--> text field (settable properties: script, name, contents, bounds)
  21.  
  22. Open the SimpliFace Dictionary, using the AppleScript Script Editor, to see more details. Note that not all apple events and properties in the Dictionary are implemented yet (all the above-listed properties are).
  23.  
  24. The scripting model for SimpliFace is that there is one 'shared handlers' script (a property of the application object) that is used to define subroutines and aevt handlers that are shared between all objects. This script is the 'parent' of all other scripts.
  25.  
  26. When an Apple Event is received by SimpliFace, SimpliFace resolves the object that the event is aimed at (the 'direct parameter' of the event specifies the target object). SimpliFace then dispatches the Apple Event to the script of the target object. Since the parent of that script is the shared handlers script, handlers in it can refer to handlers in the shared script.
  27.  
  28. User-initiated keyboard or mouse actions are intercepted by SimpliFace, and converted to a special Apple Event called a 'user event'. This encapsulates the kind of event (mouse down in window content, menu selection, or key pressed), together with other information that might be useful to the script such as the name of the menu and the menu item (for a menu selection event). The 'user event' is dispatched to the script of the current window (if there is one, or direct to the shared handlers script if there is not). The sample shared handlers script we have supplies re-dispatches this as a subroutine call message to the window script, which can handle it if it wishes.
  29.  
  30. The way that SimpliFace works is that if any run-time error occurs in the script while the user event is being handled, or if the message is 'continued' out of the last handler that caught it, or if the user event is not handled at all, the normal behaviour for that event takes place in the program code.
  31.  
  32. User events work a little differently, if there is an active SimpliFace window. If there is a mouse click in a text field or button, the script for the field or button (if there is one) gets first crack at the user event. In this situation, the parent of the field or button script is the window's script, and the parent of the window's script is still the shared handlers script.
  33.  
  34. If the user attempts to close a window, the 'close' Apple Event message is sent to the script of the window. If the script handles the message and does not 'continue' it, and as long as no script error occurs, the window will not be closed. Otherwise, the window will be closed as normal.
  35.  
  36. Global variables are supported in scripts. Globals that are declared in handlers using the 'global' keyword will, as long as they are _not_ defined as properties in any currently executing script, be available to handlers in all scripts.
  37.  
  38. SimpliFace does not store window properties or object scripts on disk, so every time you launch it you need to set up the shared handlers and application scripts, and you must recreate all windows and window objects. Two sample scripts are supplied to demonstrate SimpliFace: run these using the AppleScript Script Editor.
  39.  
  40.  
  41. SimpliFace is an unsupported prototype, and we do not expect SimpliFace will become a product in its own right, but it does form a test-bed for technologies incorporated in our 'AgentBuilder' application. Accordingly, we want to receive your bug reports and suggestions. Send your feedback by electronic mail, please, to:
  42. - AppleLink: 'commstalk.hq'
  43. - Internet: 'commstalk.hq@applelink.apple.com'
  44.  
  45.  
  46. Paul G Smith
  47. commstalk hq
  48. August 1993
  49.